package com.boot.fx;

import javafx.application.HostServices;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.awt.*;

/**
 * @version V1.0
 * @Title: 枚举单例
 * @Description: 存储JavaFx对象, 在虚拟机（javafx）中保存场景和舞台实例（单例）
 * @ClassName: com.boot.fx.GUIState.java
 * @author: jingfan
 * @date: 2025-04-21 15:45
 * @Copyright 2024-2035 公司名称 - Powered By 自研
 */
public enum GUIState {

    INSTANCE;
    private static Scene scene;

    private static Stage stage;

    private static String title;

    private static HostServices hostServices;

    private static SystemTray systemTray;

    public static String getTitle() {
        return title;
    }

    public static Scene getScene() {
        return scene;
    }

    public static Stage getStage() {
        return stage;
    }

    public static void setScene(final Scene scene) {
        GUIState.scene = scene;
    }

    public static void setStage(final Stage stage) {
        GUIState.stage = stage;
    }

    public static void setTitle(final String title) {
        GUIState.title = title;
    }

    public static HostServices getHostServices() {
        return hostServices;
    }

    static void setHostServices(HostServices hostServices) {
        GUIState.hostServices = hostServices;
    }

    public static SystemTray getSystemTray() {
        return systemTray;
    }

    static void setSystemTray(SystemTray systemTray) {
        GUIState.systemTray = systemTray;
    }

}
